#ifndef CTIMER_H_
#define CTIMER_H_
#include <windows.h>

class CTimer
{
private:
	LARGE_INTEGER	m_Frequency;
	LARGE_INTEGER	m_Counter;
	float			m_fCurrentElapsed;
	float			m_fTimerSpeed;

	CTimer();
	CTimer(CTimer &) { }
	CTimer &operator=(CTimer &) { }
public:
	~CTimer() { }

	static CTimer *GetInstance();

	inline void SetTimerSpeed(float fSpeed) { m_fTimerSpeed = fSpeed; }

	inline float GetElapsedTime() { return m_fCurrentElapsed * m_fTimerSpeed; }
	inline float GetTimerSpeed() { return m_fTimerSpeed; }

	void Tick();
};

#endif